Saturday, October 11, 2008

ImageMagick Installation easy steps

Pretty easy stuff to install

Fire following commands

# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz

# tar xvfz ImageMagick.tar.gz

[It will create the folder ]

# cd ImageMagick-6.?.?

# ./configure

# make

# make install

Test it
For resizing
# /usr/local/bin/convert -resize 100X100 marmik1.png marmik_thum.png

For converting
# /usr/local/bin/convert marmik1.png marmik1.gif

How to Run with PHP?
Refer my previous post http://vikrant_labde.blogspot.com/2008/02/run-ffmepg-command-with-php.html get the php function form there of ur exec() or system() command failed.

runExternal("/usr/local/bin/convert -resize 100X100 marmik1.png marmik_thum.png", $code );

if($code != "") print "its error mate";

?>

More functions
http://www.imagemagick.org/script/convert.php

No comments: